package com.fas.system.controller;

import com.fas.common.core.controller.BaseController;
import com.fas.common.core.domain.AjaxResult;
import com.fas.common.core.page.TableDataInfo;
import com.fas.system.domain.FasEquipmentHistoryStatistical;
import com.fas.system.service.IFasEquipmentHistoryStatisticalService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 周报、月报、年报 Controller
 *
 * @date 2022-07-23
 */
@Api(tags = "周报、月报、年报")
@RestController
@RequestMapping("/system/report")
public class ReportController extends BaseController {

    @Resource
    private IFasEquipmentHistoryStatisticalService fasEquipmentHistoryStatisticalService;


    /**
     * 报表（周报、月报、年报）查询
     */
    @ApiOperation(value = "报表（周报、月报、年报）查询")
    @GetMapping("/listStatisticsData")
    public TableDataInfo listStatisticsData(Integer pageNum, Integer pageSize, FasEquipmentHistoryStatistical fasEquipmentHistoryStatistical){
        startPage();
        return getDataTable(fasEquipmentHistoryStatisticalService.listStatisticsData(fasEquipmentHistoryStatistical));
    }
    /**
     * 报表详细查询
     */
    @ApiOperation(value = "报表详细查询")
    @GetMapping("/getStatisticsDetail")
    public AjaxResult getStatisticsDetail(FasEquipmentHistoryStatistical fasEquipmentHistoryStatistical){
        return AjaxResult.success(fasEquipmentHistoryStatisticalService.getStatisticsDetail(fasEquipmentHistoryStatistical));
    }

}
